<!DOCTYPE html>
<html lang="zh">
<head>
    <th:block th:include="include :: header('文件上传')" />
    <th:block th:include="include :: bootstrap-fileinput-css" />
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-content">
                    <div class="form-group">
                        <label class="font-noraml">图片上传示例</label>
                        <br>
                        <div class="fileinput fileinput-new" data-provides="fileinput">
                            <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px; line-height: 150px;"></div>
                            <div>
                                <span class="btn btn-white btn-file"><span class="fileinput-new">选择图片</span><span class="fileinput-exists">更改</span><input type="hidden" value="" name=""><input type="file" name=""></span>
                                <a href="#" class="btn btn-white fileinput-exists" data-dismiss="fileinput">清除</a>
                            </div>
                        </div>
                    </div>
                    <hr>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: bootstrap-fileinput-js" />
<script type="text/javascript">

    var prefix = ctx + "system/work";

    $(document).ready(function () {
        $("#fileinput-demo-1").fileinput({
            'theme': 'explorer-fas',
            'uploadUrl': prefix+"/test",
            overwriteInitial: false,
            initialPreviewAsData: true,
            initialPreview: [

            ]
        });
    });
</script>
</body>
</html>
